function h=NRN_PCA_samples_VarSelect(dt,VarSelect)

% NRN_PCA_samples_VarSelect opens solo pca figure and displays samples for selected variables 
% Syntax: h=ClusterVarSelect(dt,VarSelect)
% Description : VarSelect can be the numerical indexes of the variables or a cell array
%                        with the variable names.
%
%Jonas Almeida 4 Feb 2007

if iscell(VarSelect)
    for i=1:length(VarSelect)
        s(i)=strmatch(VarSelect{i},dt.vars);
    end
    VarSelect=s;
end

dt.vars=dt.vars(VarSelect);
dt.nx=dt.nx(:,VarSelect);
%assignin('base', 'dt', dt);
%h=NRN_PCA_samples;
dissimilarities = pdist(zscore(dt.nx));
Y=mdscale(dissimilarities,2,'criterion','strain');
h=figure;
i=find(dt.y==1);plot(Y(i,1),Y(i,2),'s','MarkerFaceColor','k','MarkerEdgeColor','k');
hold on
i=find(dt.y==0);plot(Y(i,1),Y(i,2),'o','MarkerFaceColor','y','MarkerEdgeColor','r')
xlabel('1st Axis')
ylabel('2nd axis')

%disp(':-)')
